home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / PlayerPRO 4.5.8 / PlayerPRO 4.5.8 Dev.Kit / Plug-Ins / Music Import⁄Export Plugs / FileUtilsPC.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-25  |  1.2 KB  |  74 lines  |  [TEXT/CWIE]

  1. #include "RDriver.h"
  2. #include "FileUtils.h"
  3.  
  4. void iFileCreate( Ptr AlienFileName, long)
  5. {
  6. }
  7.  
  8. FILE* iFileOpen( Ptr name)
  9. {
  10.     return fopen( name, "rb");
  11. }
  12.  
  13. long iGetEOF( FILE* iFileRefI)
  14. {
  15.     long curEOF;
  16.     
  17.     fseek( iFileRefI, 0, SEEK_END);
  18.     curEOF = ftell( iFileRefI);
  19.     fseek( iFileRefI, 0, 0);
  20.     
  21.     return curEOF;
  22. }
  23.  
  24. OSErr iRead( long size, Ptr dest, FILE* iFileRefI)
  25. {
  26.     fread( dest, size, 1, iFileRefI);
  27.     
  28.     return noErr;
  29. }
  30.  
  31. OSErr iSeekCur( long size, FILE* iFileRefI)
  32. {
  33.     return fseek( iFileRefI , size, SEEK_CUR);
  34. }
  35.  
  36. OSErr iWrite( long size, Ptr dest, FILE* iFileRefI)
  37. {
  38.     fwrite( dest, size, 1, iFileRefI);
  39.     
  40.     return noErr;
  41. }
  42.  
  43. void iClose( FILE* iFileRefI)
  44. {
  45.     fclose( iFileRefI);
  46. }
  47.  
  48. void MOT32( void *msg_buf)
  49. {
  50.   unsigned char     *buf = (unsigned char*) msg_buf;
  51.   unsigned long        out;
  52.   
  53.   out = ( (unsigned long) buf[0] << 24L) | ( (unsigned long) buf[1] << 16L) | ( (unsigned long) buf[ 2] << 8L) | ( (unsigned long) buf[3]);
  54.     *((unsigned long*) msg_buf) = out;
  55. }
  56.  
  57. void MOT16( void *msg_buf)
  58. {
  59.   unsigned char     *buf = (unsigned char*) msg_buf;
  60.   unsigned short    out;
  61.   
  62.   out = ((unsigned short) buf[0] << 8L) | ( (unsigned short) buf[1]);
  63.     *((unsigned short*) msg_buf) = out;
  64. }
  65.  
  66. void INT32( void *msg_buf)
  67. {
  68. }
  69.  
  70. void INT16( void *msg_buf)
  71. {
  72. }
  73.  
  74.